//Page Object

import  request from '../../request/request.js'
console.log(request)
Page({
  data: {
    swiperList:[],
    cateList:[],
    floorList:[]
    
  },
 
//获取首页轮播图数据
getswiperList() {
  request({url: '/home/swiperdata'})
  .then(result=>{
    console.log(result)
        this.setData({
          swiperList:result
        })


  })

},

// 获取分类列表
getcateList() {
  request({url: '/home/catitems'})
  .then(result=>{
    console.log(result)
        this.setData({
          cateList:result
        })
  })

},

// 获取楼层数据
getfloorList() {
  request({url: '/home/floordata'})
  .then(result=>{
    console.log(result)
        this.setData({
          floorList:result
        })
  })
},





  onLoad: function(options) {
    this.getswiperList()
    this.getcateList()
    this.getfloorList()



   


  

   


 

    
  },



   

  onReady: function() {
    
  },
  onShow: function() {
    
  },
  onHide: function() {

  },
  onUnload: function() {

  },
  onPullDownRefresh: function() {

  },
  onReachBottom: function() {

  },
  onShareAppMessage: function() {

  },
  onPageScroll: function() {

  },
  //item(index,pagePath,text)
  onTabItemTap:function(item) {

  }
});
  




  // index
  // category
  // goods_list
  // goods_detail
  // cart
  // collect
  // order
  // search
  // user
  // feedback
  // login
  // auth
  // pay
  